package restlet;

import org.restlet.data.Reference;
import org.restlet.resource.ServerResource;

import restlet.interfaces.UserResourceI;

public class UserServerResource extends ServerResource implements UserResourceI{

	@Override
	public Boolean logIn() {

		String username = Reference.decode((String) getRequest().getAttributes().get("username"));
		String password = Reference.decode((String) getRequest().getAttributes().get("password"));

		System.out.println("Primljeno, username: " + username + " , password: " + password );
		
		//mala provera
		if (username == null || password == null) {
			return false;			
		}

		
		return true;
		
		/*User readedUser = Util.getUser(username, password);

		if (readedUser != null) {
			return 1;			
		}
		else {
			return 0;	
		}*/
	}
	
}
